package com.inboyu.operation.domain;

import com.inboyu.listing.domain.StoreId;

public class TenantWxConfig {
    private WxConfigId wxConfigId; // 业务ID
    private String appId; // 微信应用ID（公众号、小程序appid）
    private String secret; // 密钥
    private String title; // 展示账号名称
    private String mode; // 连接模式
    private WxType type; // 公众号类型（字典：企业号、小程序）
    private TenantId tenantId; // 运营商ID
    private StoreId storeId; // 门店ID
    private AuthStatus authStatus; // 状态；已授权、未授权

    public TenantWxConfig() {
    }

    public TenantWxConfig(WxConfigId wxConfigId, String appId, String secret, String title, String mode,
                          WxType type, TenantId tenantId, StoreId storeId, AuthStatus authStatus) {
        this.wxConfigId = wxConfigId;
        this.appId = appId;
        this.secret = secret;
        this.title = title;
        this.mode = mode;
        this.type = type;
        this.tenantId = tenantId;
        this.storeId = storeId;
        this.authStatus = authStatus;
    }

    public static TenantWxConfig of(WxConfigId wxConfigId, String appId, String secret, String title, String mode,
                                    WxType type, TenantId tenantId, StoreId storeId, AuthStatus authStatus) {

        return new TenantWxConfig(wxConfigId, appId, secret, title, mode, type, tenantId, storeId, authStatus);
    }
}
